package com.jxsr.controller;


import com.jxsr.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "测试controller")
public class TestController {

    @ApiOperation("用户对象生成接口")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "姓名", required = true),
            @ApiImplicitParam(name = "sex", value = "性别", required = true),
            @ApiImplicitParam(name = "age", value = "年龄", required = true),
    })
    @GetMapping
    public User function(String name, String sex, Integer age) {
        User user = new User(name, sex, age);
        return user;
    }
}
